package com.shayne.runable;

import insidefx.undecorator.Undecorator;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

@SuppressWarnings("restriction")
public class RunableProgram extends Application{
	
	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage stage) throws Exception {
		AnchorPane root = FXMLLoader.load(getClass().getResource("/screenmain.fxml"));
		Undecorator undecorator = new Undecorator(stage,root);
		Scene scene = new Scene(undecorator);
		
		// Transparent scene and stage
		scene.setFill(Color.TRANSPARENT);
		stage.initStyle(StageStyle.TRANSPARENT);
		
		
		stage.setTitle("No title bar");
		stage.setScene(scene);
		
		stage.show();
	}
}
